package com.itheima.utils;


import java.io.FileInputStream;

import java.io.IOException;
import java.util.List;

public class ExcelTest {
    public static void main(String[] args) throws IOException {

        FileInputStream inputStream = new FileInputStream("F:\\教学视频\\第4阶段_项目_健康管理\\day05\\资料\\hello.xlsx");
/*
        //工作薄
        XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
        //工作表
        XSSFSheet sheet = workbook.getSheetAt(0);
        //行数据
        XSSFRow row = sheet.getRow(0);
        //单元格
        XSSFCell cell = row.getCell(0);
        //取数据
        System.out.println(cell);
        //关闭
        inputStream.close();*/

        List<String[]> list = POIUtils.readExcel(inputStream, "hello.xlsx");

        for (String[] strings : list) {
            System.out.println("strings = " + strings);
            for (String string : strings) {
                System.out.println("string = " + string);
            }
            System.out.println();
        }


    }
}
